{% extends "base.html" %}

{% block title %}Home{% endblock %}
{% block content_title %}Home{% endblock %}

{% block content %}
<div class="grid grid-cols-1 md:grid-cols-2 gap-5">
  <div class="card w-96 bg-base-100 shadow-xl">
    <div class="card-body">
      <h2 class="card-title">Map catalog</h2>
      <ul class="list-disc">
      {% for entry in wms_services %}
        <li>{{ entry.wms_path }}: <a href="{{ entry.wms_path }}?SERVICE=WMS&REQUEST=GetCapabilities">Capabilities</a>
                                  <!-- <a href="qwc2_map/{{ entry.id }}/">Viewer</a> -->
        </li>
      {% endfor %}
      </ul>
    </div>
  </div>
  <div class="card w-96 bg-base-100 shadow-xl">
    <div class="card-body">
      <h2 class="card-title">Map request examples</h2>
      <ul class="list-disc">
      {% for link in links %}
        <li><a href="{{ link | safe }}">{{ link|truncate(20) }}</a></li>
      {% endfor %}
      </ul>
    </div>
  </div>
  <div class="card w-96 bg-base-100 shadow-xl">
    <div class="card-body">
      <h2 class="card-title">OGC API endpoints</h2>
      <ul class="list-disc">
        <!-- <li><a href="ogcapi/">OGC API landing page (JSON)</a></li> -->
        <li><a href="openapi.json">OpenAPI spec (JSON)</a></li>
        <!-- <li><a href="redoc.html">Redoc OpenAPI Docs</a></li> -->
      </ul>
    </div>
  </div>
  <div class="card w-96 bg-base-100 shadow-xl">
    <div class="card-body">
      <h2 class="card-title">Links</h2>
      <ul class="list-disc">
        <li><a href="metrics">Metrics endpoint</a></li>
      </ul>
    </div>
  </div>
</div>
{% endblock %}
